function pages(t,p){
/**if(t=="s"){
		p--;
	}else{
		p++;
	}*/
	$("#nowpages").val(""+p);
$("form:first").submit();
}
/* 添加年月 */
function selectrecord() {
	var d = document.getElementsByClassName("d_t");
	if (d[0].style.display == "none") {
		d[0].style.display = "block";
		var time = new Date();
		var y = time.getFullYear();
		for (var i = 2015; i <= y; i++) {
			$(".selsecyear").append("<option >" + i + "</option>");
		}
		for (var i = 1; i <= 12; i++) {
			$(".selsecm").append("<option >" + i + "</option>");
		}
	}

}
/* 判断闰年、月份添加日期 */
function addDay(id) {
	var year = null;
	var month = null;
	var day = null;
	var dayid = null;
	if (id == "1") {
		year = $("#starty option:selected").text();
		var month = $("#startm option:selected").text();
		dayid = "startd";
	} else {
		year = $("#stopy option:selected").text();
		var month = $("#stopm option:selected").text();
		dayid = "stopd";
	}
	if (((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) && month == 2) {
		day = 29;
	} else if (month == 1 || month == 3 || month == 5 || month == 7
			|| month == 8 || month == 10 || month == 12) {
		day = 31;
	} else if (month == 4 || month == 6 || month == 9 || month == 11) {
		day = 30;
	} else {
		day = 28;
	}
	for (var i = 1; i <= day; i++) {
		$("#" + dayid).append("<option >" + i + "</option>");
	}
}

/* submit提交判断 */
function ssubmit() {
	var startyear = $("#starty option:selected").text();
	var startmonth = $("#startm option:selected").text();
	var startday = $("#startd option:selected").text();
	var stopyear = $("#stopy option:selected").text();
	var stopmonth = $("#stopm option:selected").text();
	var stopday = $("#stopd option:selected").text();
	if (startyear === "年" && startmonth === "月" && startday === "日") {
		selectAll();
	} else if (startyear < stopyear) {
		selectAll();
	} else if (startyear == stopyear) {
		if (startmonth < stopmonth) {
			selectAll();
		} else if (startmonth == stopmonth) {
			if (startday <= stopday) {
				selectAll();
			}
		}
	} else {
		alert("日期错误！");
	}

}

/* 查询全部 */
function selectAll() {
	$("form:first").submit();
}
